
add_library(trieTree SHARED
    trie.cpp
    trie_node.cpp
)

# 分离调试符号到.sym文件
add_custom_command(TARGET trieTree POST_BUILD
    COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $<TARGET_FILE:trieTree> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/trieTree.sym
    COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $<TARGET_FILE:trieTree>
    COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/trieTree.sym $<TARGET_FILE:trieTree>
)